package com.gch.service.impl;

import com.gch.mapper.StudentMapper;
import com.gch.pojo.Student;
import com.gch.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public void insertStu(Student student) {
        studentMapper.insertSelective(student);
    }


    @Override
    public void findByTid(Integer id) {
            studentMapper.edit(id);
    }

    @Override
    public Student findAll(Integer id) {
        return studentMapper.selectByPrimaryKey(id);
    }

}
